<template>
	<radio-group @change="radioChange" :value="value">
		<slot></slot>
	</radio-group>
</template>
<script>
	export default {
		name: 'my-slider',
		computed: {},
		props: {
			value: {
				type: Number,
				default: 0
			}
		},
		mounted() {
		},
		methods: {
			// 滑动结束时触发
			radioChange(e) {
				const {
					value
				} = e.detail
				// 更新v-model的值
				this.$emit('input', value)
				this.$emit('change', e)
			}
		}
	}
</script>